import tkinter


class ShelfGui:
    def run( self ):
        self._mainwnd.mainloop()
    def __init__(self):
        pos_x = ( self._mainwnd.winfo_screenwidth() - self._wwidth ) / 2
        pos_y = ( self._mainwnd.winfo_screenheight() - self._wheight ) / 2
        self._mainwnd.geometry('%dx%d+%d+%d' %(self._wwidth, self._wheight, pos_x, pos_y))
        self._mainwnd.title( 'shelf - gui v0.1 on Win32' )
        self._l = tkinter.Listbox(self._mainwnd, bd=0)
        self._l.pack(side='top', fill='both', expand=1)
        fr = tkinter.Frame(self._mainwnd, height=50)
        fr.pack(side='bottom', fill='x')
        self._btnAdd = tkinter.Button(fr, text='Add', width=13)
        self._btnAdd.place(x=10, y=10)

    _wwidth = 800
    _wheight = 600
    _mainwnd = tkinter.Tk()
    _l = None
    _btnAdd = None

